﻿using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;
using DXApplication_TestDemo.Models.BindingModels;

namespace DXApplication_TestDemo.ViewModels
{
    [POCOViewModel()]
    public class SettingViewModel
    {
        public SettingModel SettingModels { get; set; }

        public DelegateCommand SendDataCommand { get; private set; }

        public SettingViewModel()
        {
            SettingModels = new SettingModel();
            SettingModels.Test = 123456;
            SendDataCommand = new DelegateCommand(SendData);

        }

        private void SendData()
        {
            //发送消息
            Messenger.Default.Send<int>(SettingModels.Test, "TokenInt");
        }
    }
}
